﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Drawing;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Windows.Forms;
namespace Freeopen.Controls
{
    public enum Enu_FormDockStyle
    {
        None = 0,
        Left = 1,
        Top = 2,
        Right = 3,
        Bottom = 4,
    }

    [Serializable]
    public class FormStartInfo
    {
        [NonSerialized]
        private Form m_frmDockWindow = null;
        private string m_strSerialFileName = string.Empty;
        private Size m_szFormSize = Size.Empty;
        private Point m_ptFormLocation = Point.Empty;
        private Enu_FormDockStyle m_iDockStyle = Enu_FormDockStyle.None;
        private bool m_bFormVisible = false;


        /// <summary>   
        /// 构造函数  
        /// </summary>   
        /// <param name="frmItem">停靠的窗体对象</param>   
        public FormStartInfo(Form frmItem)
        {
            try
            {
                m_frmDockWindow = frmItem;

                if (null == frmItem) m_strSerialFileName = "StartInfo.dat";
                else m_strSerialFileName = frmItem.Name + frmItem.Text + "_StartInfo.dat";
            }
            catch { }
        }

        /// <summary>   
        /// 窗体大小  
        /// </summary>   
        public Size FormSize
        {
            get { return m_szFormSize; }
            internal set { m_szFormSize = value; }
        }

        /// <summary>   
        /// 窗体位置坐标  
        /// </summary>   
        public Point FormLocation
        {
            get { return m_ptFormLocation; }
            internal set { m_ptFormLocation = value; }
        }
    }
}
